// Copyright 2022 a.o.smith ALL Rights Reserved
package com.liuxinlong.enums;

/**
 * 物料履历操作类型枚举
 *
 * @author liuxinlong@hotwater.com.cn
 * @version 1.0.0
 * @since 2022-03-25
 */
public enum MaterialStatusTypeEnum {
    ADD_CHANGE(1, "A","新增物料"),
    ECN_CHANGE(2, "A","ECN变更"),
    PARAM_CHANGE(3, "A","参数变更"),
    STATUS_CHANGE(4, "A","状态变更"),
    REPLACE_CHANGE(5, "A","物料替换"),
    OTHER_CHANGE(6, "A","退市变更");

    private int value;

    private String name;

    private String describe;

    MaterialStatusTypeEnum(int value, String name, String describe) {
        this.value = value;
        this.name = name;
        this.describe=describe;
    }

    public int getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    public String getDescribe() {
        return describe;
    }

    public static String getNameByValue(int value) {
        MaterialStatusTypeEnum arrObj[] = MaterialStatusTypeEnum.values();
        for (MaterialStatusTypeEnum obj : arrObj) {
            if (value == obj.getValue()) {
                return obj.getName();
            }
        }
        return "其他变更";
    }
}
